Search Commands

February 20, 2023

Last updated on July 31, 2026

Next Unread Page

Starting from the current page, find the next unread page in hierarchical order across all sections and notebooks and navigate to that page.

 

Previous Unread Page

Starting from the current page, find the previous unread page in hierarchical order across all sections and notebooks and navigate to that page.

 

Search

Default shortcut is Shift + Alt + G

The Search dialog provides full-text search using common matching criteria and, optionally, move or copy selected pages across sections and notebooks or create an index page of selected pages.

 

Note: This is a non-indexed search, meaning  that it will sequentially scan through all pages in the selected scope. Depending on the number of pages and size of each page, this could take a few seconds or it could take a few minutes! Set the scope accordingly.

 

You can match on substrings within words. For example, "search" will match the words "search", "searches", and "searching".

 

Use AND, OR, and NOT operators along with parenthesis to build simple search criteria. For example

 

blue and red or (not green)

 

Strings can also be quoted

 

"blue and red" will match the exact string "blue and red", whereas the previous criteria will match paragraphs containing the string "blue" AND the string "red".

 

Every paragraph matching the criteria will be shown as a clickable hyperlink that, when clicked, will navigate to that paragraph. Once you click a result to navigate to that paragraph, then the next and previous buttons are enabled and clicking them will navigate to the next or previous hit. Those buttons can also be operated by pressing the N and P keys or Down and Up keys respectively.

 

Options

Match case matches the input query string exactly. When using regular expression, it will automatically add or remove the IgnoreCase option to the regex.

 

Use regular expressions treats your entire query as a regular expression. No other adjustments to the input text are made. The Search button is only enabled when the regular expression is valid.

 

Search text in table of contents can be enabled to treat the OneMore-generated table of contents as searchable text. This is disabled by default to avoid finding duplicate references on pages.

 

The date selectors apply to the last modified date of each page.

 

You can also right-click items to either navigate to the hit in the current window or open the page in a new OneNote window.

 

Operations

The Index button will create a new page with an index of selected pages.

The Copy button will copy the selected pages to another section or notebook.

The Move button will move the selected pages to another section or notebook.

 

 

Search and Replace

Default shortcut is Ctrl + H

Search for a specified phrase and replace each occurrence with a new phrase. Use standard Regular Expression syntax for advanced searches; substitution parameters can be used to inject regular expression captures.

 

Warning

A regular expression with non-greedy syntax could corrupt, delete parts, or erase all content on a page. Be sure to test your regular expression on a single page before targeting a section or notebook.

 

This searches line-by-line so it will not find text that spans paragraphs or table cells. If the text cursor is currently within a word, that word is shown as the default text to replace in the Find what field.

 

 

If the Replace with text contains the sequence \n then that is replaced with a Newline character. For example, replacing text with "one\ntwo" will result in two lines as follows:

 

one
two

 

Due to the way regular expressions are interpreted, if you want to replace 12:33:47 with 12:33 then use a regular expression like ((\d{2}:\d{2}):\d{2}) and replace with $2. If you exclude the outer parenthesis and replace with $1, the result will be no change.

 

 

Search Titles

Default shortcut is Shift + Alt + Period

Quickly search only page titles for a specified phrase. This accepts the same standard query syntax employed by the Search dialog, meaning simple AND, OR, and NOT operators.

 

Additionally, the following syntax is allowed in the Find box. These can be used in combination to quickly limit the search results to exactly what's needed. They can be used in any order.

 

"apple tart"

Use quotes to find specific pages that include spaces in their names

>apple

Preface the search term with ">" to sort by last modified time, most recent first. By default, sorting is alphabetical

#fruit

Add one or more hashtags to the query to further restrict  the search result to only pages that have those hashtags

\market

Specify the name of a notebook to show only pages that match within that notebook. This is a partial name search so may match more than one notebook.

\\

Limit search results to the current notebook. This would be the same as specifying the current notebook name using "\name"

 

Tab into the result list. Press Up/Down/PageUp/PageDn to select an item, Space to toggle its checkbox, Enter to navigate to that page.

 

Select items from the search results and press the Index button to create a new page with a list of selected pages and their hyperlinks.

 

 

#omwiki #omcommands

 

© 2020 Steven M Cohn. All rights reserved.

Please consider a sponsorship or one-time donation to support ongoing development

 

Created with OneNote.